<%@page contentType="text/html; charset=utf-8"%>
<!DOCTYPE html>
<html>
<head>
    <%@include file="common/header.jsp"%>
    <title>创业武汉合伙人</title>
    </head>
<body>
<!-- page 容器 -->
<div class="page">
    <!-- 标题栏 -->
    <header class="bar bar-nav bgcolor nobottom">
        <a class="button button-link button-nav whitecolor pull-left back  no-transition" href="javascript:history.go(-1);">
            <span class="icon icon-left"></span>
        </a>
        <h1 class="title whitecolor">我的创业之家</h1>
    </header>


    <!-- 这里是页面内容区 -->
    <div class="content whitebg infinite-scroll" data-distance="100">
        <div class="buttons-tab">
            <a href="#tab1" class="tab-link active button">我的入驻</a>
            <a href="#tab2" class="tab-link button">我的发起</a>
        </div>
        <div class="tabs">
            <div id="tab1" class="tab active graycolor" >
                <div class="contentList" data-totalPage="${joinPager.totalPage}" data-pageNum="1">
                    <%--<c:forEach items="${joinPager.resultList}" var="cyzjOrg">--%>
                        <div class="live">
                            <div class="live-left"><img class="logoUrl lazy" src="images/empty.png"
                                                        data-original="${Dict.prefix('UPLOAD')}${cyzjOrg.logoUrl}"></div>
                            <a class="toDetail" href="">
                                <div class="live-center">
                                    <div class="row_nowrap cyzjTitle"></div>
                                    <div class="row_nowrap little_size cyzjAddress">地址：</div>
                                    <div class="item-title labelMain">
                                        <span class="tag"></span>
                                    </div>
                                    <div class="row_nowrap little_size gray blue">查看详情</div>
                                </div>
                                <div class="live-right creating">创</div>
                            </a>
                        </div>
                    <%--</c:forEach>--%>
                    </div>
                    <!-- preloader -->
                    <%--<c:if test="${joinPager.totalPage>=2}">--%>
                        <div class="infinite-scroll-preloader">
                            <div class="preloader"></div>
                        </div>
                    <%--</c:if>--%>
            </div>
            <div id="tab2" class="tab" >
                <div class="contentList" data-totalPage="${createPager.totalPage}" data-pageNum="1">
                    <%--<c:forEach items="${createPager.resultList}" var="cyzjOrg">--%>

                    <%--</c:forEach>--%>
                    </div>
                    <!-- preloader -->
                    <%--<c:if test="${createPager.totalPage>=2}">--%>
                        <div class="infinite-scroll-preloader">
                            <div class="preloader"></div>
                        </div>
                    <%--</c:if>--%>
                </div>
            </div>
        </div>
</div>

<%@include file="common/panel.jsp"%>
</body>
</html>
<%@include file="common/footer.jsp"%>
<%@include file="common/nav_header_new.jsp"%>
<script>
    $.init();
    var objBase = $(".contentList > .live").eq(0).clone();
    var contentList = $(".contentList");
    contentList.empty();

    var loading = false;

    function addItems(data,content) {
        $.each(data.resultList,function(){
            var obj = objBase.clone();
            obj.find(".cyzjTitle").text(this.orgName);
            obj.find(".cyzjAddress").text("地址：" + this.address);

            var labelMainDiv = obj.find(".labelMain").empty();
            if (this.labelMain != null) {
                var labelMainList = this.labelMain.split("|");
                $.each(labelMainList, (function () {
                    if (this != '') {
                        var html = '<span class="tag">' + this + '</span>';
                        labelMainDiv.append(html)
                    }
                }));
            }

            obj.find(".logoUrl").attr("data-original", "${Dict.prefix('UPLOAD')}" + this.logoUrl);
            obj.find(".toDetail").attr("href", "${ctx}/m/cyzjDetail.do?id=" + this.id);
            content.append(obj);
        });
        var pageNum = parseInt(content.attr("data-pageNum")) + 1;
        content.attr("data-pageNum", pageNum);
        lazyLoad();
    }

    function queryUrl() {
        var isTab1 = $("#tab1").hasClass("active");
        if (!isTab1) {
            return "cyzjPagerM.do?map.user_I=master";
        } else {
            return "cyzjPagerM.do?map.user_I=join";
        }
    }

    contentList = $(".tab.active > .contentList");
    ajaxTODO(null, contentList, true);
</script>